package khleuven.mondzorg.domain;

public enum DestinationGroup {
	CHILDREN("Kinderen"),
	ADULTS("Volwassenen"),
	PROFESSIONALS("Professionals");
	
	private final String nameInDb;
	
	private DestinationGroup(String nameInDb){
		this.nameInDb = nameInDb;
	}
	
	public String getNameInDb(){
		return nameInDb;
	}
	
	public static DestinationGroup getFromDbName(String dbName){
		DestinationGroup destination = null;
		for(DestinationGroup d: values()){
			if(d.getNameInDb().equals(dbName)){
				destination = d;
			}
		}
		return destination;
	}
}
